<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)	
Try
	Dim strConn As String
	strConn="Provider=Microsoft.Jet.OLEDB.4.0;" 
	strConn +="Data Source=C:\Program Files\" 
	strConn +="Microsoft Office\Office\"
	strConn +="Samples\Northwind.mdb"

	Dim myConn As OleDbConnection  = _
	New OleDbConnection(strConn)
	myConn.Open	
	Dim strSQL as String
	strSQL="select * from Customers"	
	strSQL=strSQL & " where CustomerID like 'A%'"
	Dim myCom As OleDbCommand = _
	New OleDbCommand(strSQL,myConn)
	Dim myReader As OleDbDataReader = _
	 myCom.ExecuteReader()
    	While myReader.Read()
		Response.Write(myReader("CustomerID") )
		Response.Write(" - ")
		Response.Write(myReader("CompanyName") )
		Response.Write("<br />")
	End While
	myConn.Close
Catch objError As Exception
	response.write("<b>* Error</b>: " & _
	objError.Message & "<p />")
End Try
End Sub
</script>	
